import time
from selenium.webdriver.support.ui import WebDriverWait
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
# //*[@id="fromStationText"]  出发地
# //*[@id="toStationText"]   到达地
browser = webdriver.Chrome()
browser.get('https://www.12306.cn/index/')


id_from_word = 'fromStationText'


locator = (By.ID, id_from_word)
wait = WebDriverWait(browser, 10).until(EC.presence_of_element_located(locator))

input = browser.find_element(By.ID, id_from_word)

input.clear()
input.send_keys("厦门")


id_go_word = 'toStationText'


locator2 = (By.ID, id_go_word)

input2 = browser.find_element(By.ID, id_go_word)

input2.clear()
input2.send_keys("泉州")
time.sleep(100)

